import {
  HTTP,
  showError
} from '../../utils/request.js'
const http = new HTTP()
import {
  formatDate
} from '../../utils/util.js'

const app = getApp()
Page({
  data: {
    labels: [
      {
      id: 0,
      img: '../../images/search.png',
      title: '果蔬识别',
      desc:'识别果蔬并给出食用建议'
    },
    {
        id: 0,
        img: '../../images/search.png',
        title: '菜品识别',
        desc: '识别菜品并给出食用建议'
      },
    ],
    news: [{
      id: 0,
      thumb: '/images/doctor.png',
      title: '秃顶为什么没有被自然淘汰？',
      content: '一个性状是否会被自然选择淘汰，不止是是是是是是是所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所'
    },
    {
      id: 1,
      thumb: '/images/doctor.png',
      title: '隐形正畸的危害？30岁再进行正畸还来得及吗？',
      content: '一个性状是否会被自然选择淘汰，不止是是是是是是是所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所'
    },
    {
      id: 2,
      thumb: '/images/doctor.png',
      title: '秃顶为什么没有被自然淘汰？',
      content: '一个性状是否会被自然选择淘汰，不止是是是是是是是所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所'
    },
    ],
    meal:[
      {
        id:0,
        text:'早餐'
      },
      {
        id: 1,
        text: '中餐'
      },
      {
        id: 2,
        text: '加餐'
      },
      {
        id: 3,
        text: '晚餐'
      },
    ]
  },

  onload() {

  },
  gotomore:function(e){
    wx.navigateTo({ url: '/pages/ask/ask' });
  },

  onLabel(e) {
    console.log(e)
    const id = e.currentTarget.dataset.id
    if (id === 1) {
      wx.navigateTo({ url: '/pages/ask/ask' });
    } else if (id === 0) {
      wx.navigateTo({ url: '/pages/diseases/diseases' });
    }
  },

  onBtn(e) {
    wx.navigateTo({ url: '/pages/question/question' });
  }
})